com.highdeal.pnr.hci
Class UniqueIdentifier

java.lang.Object
  extended by com.highdeal.pnr.hci.UniqueIdentifier
All Implemented Interfaces:
XMLMarshallable

public class UniqueIdentifier
extends java.lang.Object
implements XMLMarshallable

This object represents a unique identifier with a type and a value.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="uid">
   <xs:complexType>
     <xs:attribute name="type" type="xs:string" use="required" />
     <xs:attribute name="value" type="xs:string" use="required" />
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String TAG_NAME
          The XML tag name of this object.
 
Constructor Summary
UniqueIdentifier()
          Builds an empty unique identifier object.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String getType()
          Gets the type of the unique identifier.
 java.lang.String getValue()
          Gets the value of the unique identifier.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setType(java.lang.String type)
          Sets the type of the unique identifier.
 void setValue(java.lang.String value)
          Sets the value of the unique identifier.
 java.lang.String toString()
           
static UniqueIdentifier valueOf(java.lang.String input)
          Returns a unique identifier based on its string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag name of this object.

See Also:
Constant Field Values
Constructor Detail

UniqueIdentifier

public UniqueIdentifier()
Builds an empty unique identifier object.

Method Detail

getType

public java.lang.String getType()
Gets the type of the unique identifier.

Returns:
the type of the unique identifier

setType

public void setType(java.lang.String type)
Sets the type of the unique identifier.

Parameters:
type - the type of the unique identifier

getValue

public java.lang.String getValue()
Gets the value of the unique identifier.

Returns:
the value of the unique identifier

setValue

public void setValue(java.lang.String value)
Sets the value of the unique identifier.

Parameters:
value - the value of the unique identifier

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

valueOf

public static UniqueIdentifier valueOf(java.lang.String input)
Returns a unique identifier based on its string representation.

Parameters:
input - an input string representing the unique identifier and following the format of the toString() method
Returns:
a unique identifier objects corresponding to the input string

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)